#pragma once

#include<iostream>
#include<sstream>

class Task
{
public:
    Task()
    {
        
    }

    Task(int a, int b)
        :_a(a)
        ,_b(b)
    { }

    void Execute()
    {
        _res = _a + _b;
    }

    void operator()()
    {
        Execute();
    }

    void Print()
    {
        std::cout << _a << " + " << _b << " = " << _res << std::endl;
    }

    std::string ToString()
    {
        std::stringstream ss;
        ss << _a << " + " << _b << " = " << _res;
        return ss.str(); 
    }

private:
    int _a;
    int _b;
    int _res;
};